package com.rong.distributed.transaction.remote;

import com.rong.distributed.transaction.mq.MessageQueue;
import com.rong.distributed.transaction.mq.bean.Message;

public class RemoteService {
	private static MessageQueue messageQueue = MessageQueue.getInstance();

	public void pollMessage() {
		while (true) {
			Message message;
			try {
				message = messageQueue.pollMessage("tranaction_test");
				System.out.println("remote:分布式消息开始执行：" + message);
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}

		}
	}
}
